import {mapState} from 'vuex';

const mixin = {
    computed: {
        ...mapState({
            // TODO 应该从缓存中获取 已经在页面上临时定义了
            // layoutMode: state => state.app.layout,
            navTheme: state => state.app.theme,
            primaryColor: state => state.app.color,
            colorWeak: state => state.app.weak,
            multipage: state => state.app.multipage,//多页签设置
            fixedHeader: state => state.app.fixedHeader,
            fixSiderbar: state => state.app.fixSiderbar,
            contentWidth: state => state.app.contentWidth,
            autoHideHeader: state => state.app.autoHideHeader,
            sidebarOpened: state => state.app.sidebar.opened
        })
    }
}

export {mixin};